﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hostal.Bussines.Entities;
using Hostal.Bussines.Repository.Service;
using Hostal.Bussines.Logic.Service;
using Microsoft.Practices.Unity;

namespace Hostal.Bussines.Logic
{
    public class InsumoService:IInsumoService
    {
        [Dependency]
        public IInsumoRepository InsumoRepository { set; get; }

        public List<Insumo> GetAllFromInsumo()
        {
            return InsumoRepository.GetAllFromInsumo();
        }

        public Insumo GetFromInsumoById(int id)
        {
            return InsumoRepository.GetFromInsumoById(id);
        }

        public List<Insumo> GetFromInsumoByNombre(string nombre)
        {
            return InsumoRepository.GetFromInsumoByNombre(nombre);
        }

        public void AddInsumo(Insumo insumo)
        {
            InsumoRepository.AddInsumo(insumo);
        }

        public void UpdateInsumo(Insumo insumo)
        {
            InsumoRepository.UpdateInsumo(insumo);
        }

        public void RemoveInsumo(int id)
        {
            InsumoRepository.RemoveInsumo(id);
        }
    }
}
